#include "Car.h"


Car::Car()
{
	brand = "N\A";
	year = -1;
	price = -1;
}

Car::Car(string brand, int year, double price)
{
	this->brand = brand;
	this->year = year;
	this->price = price;
}

Car::~Car()
{
}

void Car::writeToConsole()
{
	cout << setw(15) << brand << " : " << setw(6) << left << year << setw(10) << right << price << ":-" << endl;
}

void Car::readFromConsole(){
	string brand;
	int year;
	double price;

	cout << "Brand -> ";
	cin >> brand;

	cout << "Year -> ";
	cin >> year;

	cout << "Price -> ";
	cin >> price;

	this->brand = brand;
	this->year = year;
	this->price = price;
}